package com.mrd.gtimp.init;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * Created by dengdc on 2017/5/26.
 */
@Component
public class AutoQueryCargoDeclaInit implements InitializingBean {
    @Resource
    private ApplicationContext applicationContext;

    @Override
    public void afterPropertiesSet() throws Exception {
        Thread queryThead = new Thread(new QueryCargoDeclaRunnable(applicationContext));
        queryThead.setDaemon(true);
//        queryThead.start();
    }
}
